<?php /* Smarty version Smarty-3.1.6, created on 2018-03-12 14:14:24
         compiled from "./Tpl/Admin\Redpack\set.html" */ ?>
<?php /*%%SmartyHeaderCode:101815aa61ac06d76b2-34034495%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '8b5db49d98f13da12b5f0787e94ec0b17c065e0b' => 
    array (
      0 => './Tpl/Admin\\Redpack\\set.html',
      1 => 1517931534,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '101815aa61ac06d76b2-34034495',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'module' => 0,
    'controller' => 0,
    'action' => 0,
    'page' => 0,
    'limit' => 0,
    'ofield' => 0,
    'otype' => 0,
    'itemStatus' => 0,
    'audit' => 0,
    'auditStatus' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_5aa61ac0767f3',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5aa61ac0767f3')) {function content_5aa61ac0767f3($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_options')) include 'E:\\findmeServer\\ThinkPHP\\Library\\Vendor\\Smarty\\plugins\\function.html_options.php';
?><?php echo $_smarty_tpl->getSubTemplate ("Public/top.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

	</head>
	<body>



		<div id="warpper">
            <div class="content">
                <div class="location">微信红包</div>
                <?php echo $_smarty_tpl->getSubTemplate ("./nav.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

                <div class="filedSet" style="padding-bottom: 0;">
                    <div class="search">
                        <form action="" id="searchForm" method="get" class="ui-form reportForm">
                            <input name="m" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['module']->value;?>
">
                            <input name="c" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['controller']->value;?>
">
                            <input name="a" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['action']->value;?>
">

                            <input name="p" id="page" type="hidden" value="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['page']->value)===null||$tmp==='' ? 1 : $tmp);?>
">
                            <input name="limit" id="limit" type="hidden" value="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['limit']->value)===null||$tmp==='' ? 10 : $tmp);?>
">
                            <input name="ofield" id="ofield" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['ofield']->value;?>
">
                            <input name="otype"  id="otype"  type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['otype']->value;?>
">

                            <div class="ui-form-item inline-block">
                                <label class="ui-label">活动状态</label>
                                <select name="itemStatus" class="ui-select" style="width: 100px;">
                                    <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['itemStatus']->value,'selected'=>$_smarty_tpl->tpl_vars['audit']->value),$_smarty_tpl);?>

                                </select>
                            </div>


                            <div class="ui-form-item inline-block">
                                <button type="button" class="ui-button" onclick="query();">搜索</button>
                            </div>
                            <div class="ui-form-item inline-block">
                                <button type="button" class="ui-button" onclick="location.href='<?php echo u('add');?>
'">添加</button>
                            </div>
                        </form>
                    </div>
                </div> 
                             
                
                <!--表格内容-->
                <div class="mainGrid">
                    <table class="ui-table ui-body">
                        <thead>
                        <tr>
                            <th class="pct15">活动名</th>
                            <th class="pct10">开始时间</th>
                            <th class="pct12">波数</th>
                            <th class="pct9">总金额</th>
                            <th class="pct9">已发放金额</th>
                            <th class="pct9">领取人次</th>
                            <th class="pct9">创建时间</th>
                            <th class="pct9">状态</th>
                            <th class="pct12 last-col">操作</th>
                        </tr>
                        </thead>
                        <tbody id="listHTML">
                            <?php echo $_smarty_tpl->getSubTemplate ("./set_list.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

                        </tbody>
                    </table>
                </div>
                <div class="pagination" id="pagerHTML">
                    <!--描述：分页-->
                    <?php echo $_smarty_tpl->getSubTemplate ("Public/page_ajax.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

                </div>
            </div>
		</div>
        <?php echo $_smarty_tpl->getSubTemplate ("Public/foot_ajax.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>



        <script>
            function audit(id,obj){
                if(!confirm('是否执行审核操作')){
                    return false;
                }
                var $obj=$(obj);
                var $auditObj=$obj.prev();
                var itemType=0;
                if($auditObj.val()!="<?php echo $_smarty_tpl->tpl_vars['auditStatus']->value;?>
"){//当前处于待审核状态
                    itemType=$obj.parents("tr").find("select.itemType").val()
                    if(0==itemType){
                        layer.msg("请设置物品的所属分类");
                        return;
                    }
                }

                LayerShow();
                $.get("<?php echo u('audit');?>
",{id:id,type:itemType},function(result){
                    layer.msg(result.msg);
                    if(result.status==0){
                        $auditObj.val(result.audit);
                        if(result.audit=="<?php echo $_smarty_tpl->tpl_vars['auditStatus']->value;?>
"){
                            $obj.text("↓↓↓↓");
                        }else{
                            $obj.text("↑↑↑↑");
                        }
                    }

                },'json')
            }
        </script>

	</body>
</html>

<?php }} ?>